package com.tencent.smtt.sdk;

import android.os.Bundle;
import com.tencent.smtt.sdk.TbsReaderView;

/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes2.dex */
public class ba implements TbsReaderView.ReaderCallback {
    final /* synthetic */ TbsReaderView a;

    /* JADX INFO: Access modifiers changed from: package-private */
    public ba(TbsReaderView tbsReaderView) {
        this.a = tbsReaderView;
    }

    @Override // com.tencent.smtt.sdk.TbsReaderView.ReaderCallback
    public void onCallBackAction(Integer num, Object obj, Object obj2) {
        TbsReaderView tbsReaderView;
        String str;
        Bundle bundle;
        TbsReaderView tbsReaderView2;
        String str2;
        int intValue = num.intValue();
        String str3 = "";
        Bundle bundle2 = null;
        boolean z = true;
        if (intValue != 5026) {
            if (intValue != 5030) {
                switch (intValue) {
                    case TbsReaderView.ReaderCallback.READER_PDF_LIST /* 5008 */:
                        if (!com.tencent.smtt.sdk.a.d.c(this.a.a)) {
                            num = Integer.valueOf((int) TbsReaderView.ReaderCallback.INSTALL_QB);
                            String resString = TbsReaderView.getResString(this.a.a, TbsReaderView.ReaderCallback.READER_PLUGIN_RES_PDF_GUIDE);
                            bundle = new Bundle();
                            bundle.putString("tip", resString);
                            bundle.putString("statistics", TbsReaderView.READER_STATISTICS_COUNT_PDF_INTO_DOWNLOAD);
                            bundle.putInt("channel_id", TbsReaderView.READER_CHANNEL_PDF_ID);
                            tbsReaderView2 = this.a;
                            str2 = TbsReaderView.READER_STATISTICS_COUNT_PDF_INTO_DIALOG;
                            tbsReaderView2.userStatistics(str2);
                            obj = bundle;
                            z = false;
                            break;
                        } else {
                            if (obj != null) {
                                bundle2 = (Bundle) obj;
                                str3 = bundle2.getString("docpath");
                            }
                            QbSdk.startQBForDoc(this.a.a, str3, 4, 0, "pdf", bundle2);
                            tbsReaderView = this.a;
                            str = TbsReaderView.READER_STATISTICS_COUNT_PDF_INTO_BROWSER;
                            tbsReaderView.userStatistics(str);
                            break;
                        }
                    case TbsReaderView.ReaderCallback.READER_PPT_PLAY_MODEL /* 5009 */:
                        if (!com.tencent.smtt.sdk.a.d.c(this.a.a)) {
                            num = Integer.valueOf((int) TbsReaderView.ReaderCallback.INSTALL_QB);
                            String resString2 = TbsReaderView.getResString(this.a.a, TbsReaderView.ReaderCallback.READER_PLUGIN_RES_PPT_GUIDE);
                            bundle = new Bundle();
                            bundle.putString("tip", resString2);
                            bundle.putString("statistics", TbsReaderView.READER_STATISTICS_COUNT_PPT_INTO_DOWNLOAD);
                            bundle.putInt("channel_id", TbsReaderView.READER_CHANNEL_PPT_ID);
                            tbsReaderView2 = this.a;
                            str2 = TbsReaderView.READER_STATISTICS_COUNT_PPT_INTO_DIALOG;
                            tbsReaderView2.userStatistics(str2);
                            obj = bundle;
                            z = false;
                            break;
                        } else {
                            if (obj != null) {
                                bundle2 = (Bundle) obj;
                                str3 = bundle2.getString("docpath");
                            }
                            QbSdk.startQBForDoc(this.a.a, str3, 4, 0, "", bundle2);
                            tbsReaderView = this.a;
                            str = TbsReaderView.READER_STATISTICS_COUNT_PPT_INTO_BROWSER;
                            tbsReaderView.userStatistics(str);
                            break;
                        }
                    case TbsReaderView.ReaderCallback.READER_TXT_READING_MODEL /* 5010 */:
                        if (!com.tencent.smtt.sdk.a.d.c(this.a.a)) {
                            num = Integer.valueOf((int) TbsReaderView.ReaderCallback.INSTALL_QB);
                            String resString3 = TbsReaderView.getResString(this.a.a, TbsReaderView.ReaderCallback.READER_PLUGIN_RES_TXT_GUIDE);
                            bundle = new Bundle();
                            bundle.putString("tip", resString3);
                            bundle.putString("statistics", TbsReaderView.READER_STATISTICS_COUNT_TXT_INTO_DOWNLOAD);
                            bundle.putInt("channel_id", TbsReaderView.READER_CHANNEL_TXT_ID);
                            tbsReaderView2 = this.a;
                            str2 = TbsReaderView.READER_STATISTICS_COUNT_TXT_INTO_DIALOG;
                            tbsReaderView2.userStatistics(str2);
                            obj = bundle;
                            z = false;
                            break;
                        } else {
                            if (obj != null) {
                                bundle2 = (Bundle) obj;
                                str3 = bundle2.getString("docpath");
                            }
                            QbSdk.startQBForDoc(this.a.a, str3, 4, 0, "txt", bundle2);
                            break;
                        }
                    default:
                        z = false;
                        break;
                }
            } else if (obj != null) {
                Bundle bundle3 = (Bundle) obj;
                TbsReaderView.gReaderPackName = bundle3.getString("name");
                TbsReaderView.gReaderPackVersion = bundle3.getString("version");
            }
        } else if (com.tencent.smtt.sdk.a.d.c(this.a.a)) {
            if (obj != null) {
                bundle2 = (Bundle) obj;
                str3 = bundle2.getString("docpath");
            }
            QbSdk.startQBForDoc(this.a.a, str3, 4, 0, "doc", bundle2);
            tbsReaderView = this.a;
            str = TbsReaderView.READER_STATISTICS_COUNT_DOC_INTO_BROWSER;
            tbsReaderView.userStatistics(str);
        } else {
            num = Integer.valueOf((int) TbsReaderView.ReaderCallback.INSTALL_QB);
            String resString4 = TbsReaderView.getResString(this.a.a, TbsReaderView.ReaderCallback.READER_PLUGIN_RES_DOC_GUIDE);
            bundle = new Bundle();
            bundle.putString("tip", resString4);
            bundle.putString("statistics", TbsReaderView.READER_STATISTICS_COUNT_DOC_INTO_DOWNLOAD);
            bundle.putInt("channel_id", TbsReaderView.READER_CHANNEL_DOC_ID);
            tbsReaderView2 = this.a;
            str2 = TbsReaderView.READER_STATISTICS_COUNT_DOC_INTO_DIALOG;
            tbsReaderView2.userStatistics(str2);
            obj = bundle;
            z = false;
        }
        if (this.a.d == null || z) {
            return;
        }
        this.a.d.onCallBackAction(num, obj, obj2);
    }
}
